﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using KVB.Common;

namespace Customer_Profile.Admin
{
    public partial class operationLog : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            BindData();
        }

        protected void dtgLogList_PageIndexChanged(object source, DataGridPageChangedEventArgs e)
        {
            dtgLogList.CurrentPageIndex = e.NewPageIndex;
            BindData();
        }
        private void BindData()
        {
            DataSet ds = new DataSet();
            try
            {
                OperateDao db = new OperateDao();
                ds = db.GetOperationList();                

                if (ds != null && ds.Tables.Count > 0)
                {
                    dtgLogList.DataSource = ds.Tables[0];
                    dtgLogList.DataBind();
                }
                else
                {
                    dtgLogList.DataBind();
                }
            }
            catch (Exception ex)
            {
                Log.WriteDefaultLog("operationLogBinddata", ex.ToString());
            }
        }
    }
}
